package com.yunyi.lam.utils;

import com.yunyi.lam.pojo.Author;
import com.yunyi.lam.pojo.Book;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class GetAuthors {
    public static List<Author> getAuthors() {
        Author author = new Author(1L, "张三", 33, "法外狂徒", null);
        Author author2 = new Author(2L, "拉姆", 45, "倒霉蛋", null);
        Author author3 = new Author(3L, "福克斯", 11, "有钱人", null);
        Author author4 = new Author(4L, "阿尔法", 33, "老外", null);
        List<Book> book1 = new ArrayList<>();
        List<Book> book2 = new ArrayList<>();
        List<Book> book3 = new ArrayList<>();
        book1.add(new Book(1L, "菊与刀", "人性,哲学", 77, "讲日本人的书"));
        book1.add(new Book(2L, "时间简史", "科普,小说", 78, "讲过去的书"));
        book2.add(new Book(3L, "果壳里的宇宙", "科学", 88, "科普书籍"));
        book2.add(new Book(3L, "果壳里的宇宙", "科学", 88, "科普书籍"));
        book2.add(new Book(4L, "理想国", "哲学", 93, "柏拉图的书"));
        book3.add(new Book(5L, "金钱永不眠", "理财,幻想", 56, "貌似是个理财书籍"));
        book3.add(new Book(6L, "沙丘", "小说", 99, "史诗级小说"));
        book3.add(new Book(6L, "沙丘", "小说", 99, "史诗级小说"));
        author.setBooks(book1);
        author2.setBooks(book2);
        author3.setBooks(book3);
        author4.setBooks(book3);
        List<Author> list = new ArrayList<>(Arrays.asList(author, author2, author3, author4));
        return list;
    }

    private GetAuthors() {
    }
}
